/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.src.facade;

import java.util.ArrayList;
import java.util.Map;
import com.src.business.Itf_Business_Contribuyente;
import com.src.business.Itf_Business_Menu;
import com.src.business.Itf_Business_Persona;
import com.src.business.Itf_Business_Usuario;
import com.src.dao.Cls_Dao_Mybatis_Jdbc_Connection;
import com.src.pojos.Cls_Contribuyente;
import com.src.pojos.Cls_Menu;
import com.src.pojos.Cls_Persona;
import com.src.pojos.Cls_Usuario;
import javax.sql.DataSource;

/**
 *
 * @author Christian
 */
public class Cls_Facade implements Itf_Facade{
    
    private Itf_Business_Menu businessMenuInterface;
    private Itf_Business_Usuario businessUsuarioInterface;
    private Itf_Business_Contribuyente businessContribuyenteInterface;
    private Itf_Business_Persona businessPersonaInterface;
    
    private Cls_Dao_Mybatis_Jdbc_Connection cls_dao_Mybatis_Jdbc_Connection;

    public Cls_Dao_Mybatis_Jdbc_Connection getCls_dao_Mybatis_Jdbc_Connection() {
        return cls_dao_Mybatis_Jdbc_Connection;
    }

    public void setCls_dao_Mybatis_Jdbc_Connection(Cls_Dao_Mybatis_Jdbc_Connection cls_dao_Mybatis_Jdbc_Connection) {
        this.cls_dao_Mybatis_Jdbc_Connection = cls_dao_Mybatis_Jdbc_Connection;
    }
    
    public DataSource getConectionSistema(){
        return this.cls_dao_Mybatis_Jdbc_Connection.getDataSource();
    }
       
    public ArrayList<Cls_Menu> obtenerMenuUsuario(Map<String, String> parametros){
        return this.businessMenuInterface.obtenerMenuUsuario(parametros);
    }

    public void setBusinessMenuInterface(Itf_Business_Menu businessMenuInterface) {
        this.businessMenuInterface = businessMenuInterface;
    }


    public Cls_Usuario validarUsuario(Map<String,String> parametros){
        return this.businessUsuarioInterface.validarUsuario(parametros);
    }

    public void setBusinessUsuarioInterface(Itf_Business_Usuario businessUsuarioInterface) {
        this.businessUsuarioInterface = businessUsuarioInterface;
    }


    public ArrayList<Cls_Contribuyente> obtenerTodosContribuyentes(Map<String,String>parametros){
        return this.businessContribuyenteInterface.obtenerTodosContribuyentes(parametros);
    }

    public void setBusinessContribuyenteInterface(Itf_Business_Contribuyente businessContribuyenteInterface) {
        this.businessContribuyenteInterface = businessContribuyenteInterface;
    }

    public String insertarPersonaNatural(Map<String,Object> parametros){
//        return parametros.get("obj_personanatural").toString();
        return this.businessPersonaInterface.insertarPersonaNatural(parametros);
    }
    
    public ArrayList<Cls_Persona> obtenerTodasPersonas(Map<String,String> parametros){
        return this.businessPersonaInterface.obtenerTodasPersonas(parametros);
    }
    public int obtenerCantidadTodasPersonas(Map<String,String> parametros){
        return this.businessPersonaInterface.obtenerCantidadTodasPersonas(parametros);
    }   

    public void setBusinessPersonaInterface(Itf_Business_Persona businessPersonaInterface) {
        this.businessPersonaInterface = businessPersonaInterface;
    }      
    
}
